Fix bugs Alex found:
authorHavoc Pennington <hp@redhat.com>
Mon, 4 Dec 2000 16:11:51 +0000 (16:11 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Mon, 4 Dec 2000 16:11:51 +0000 (16:11 +0000)
2000-12-04  Havoc Pennington  <hp@redhat.com>

        Fix bugs Alex found:

* gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
to "draw"

* gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"

* gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"

* gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw()
implementation in here, apparently the expose() implementation was
dead code.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcolorsel.c
gtk/gtkdnd.c
gtk/gtklistitem.c
gtk/gtktooltips.c

index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index 8cf750dc3b3f9c86a55d5ea5974ed05703f541be..0ca9c7c0ec99d7f540ab8de7e61d4a208c0f2a06 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-04  Havoc Pennington  <hp@redhat.com>
+
+        Fix bugs Alex found:
+       
+       * gtk/gtktooltips.c (gtk_tooltips_force_window): nuke connection
+       to "draw"
+
+       * gtk/gtkdnd.c (gtk_drag_highlight): nuke connection to "draw"
+
+       * gtk/gtkcolorsel.c (palette_new): nuke connection to "draw"
+
+       * gtk/gtklistitem.c (gtk_list_item_expose): Put the old _draw() 
+       implementation in here, apparently the expose() implementation was
+       dead code.
+
 2000-12-04  Alexander Larsson  <alexl@redhat.com>
 
        * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
index e7c10694d82d1da0e41034b29ed7c86ed9f872b3..4bcce9934b4adb8ea0667ddd80587aedad70dc2a 100644 (file)
@@ -621,14 +621,6 @@ palette_press (GtkWidget      *drawing_area,
   gtk_widget_queue_clear (priv->last_palette);
 }
 
-static void
-palette_draw (GtkWidget    *drawing_area,
-             GdkRectangle *area,
-             gpointer      data)
-{
-  palette_paint (drawing_area, area, data);
-}
-
 static void
 palette_unset_color (GtkWidget *drawing_area)
 {
@@ -819,7 +811,6 @@ palette_new (GtkColorSelection *colorsel)
   gtk_object_set_data (GTK_OBJECT (retval), "color_set", GINT_TO_POINTER (0)); 
   gtk_widget_set_events (retval, GDK_BUTTON_PRESS_MASK | GDK_EXPOSURE_MASK);
   
-  gtk_signal_connect (GTK_OBJECT (retval), "draw", palette_draw, colorsel);
   gtk_signal_connect (GTK_OBJECT (retval), "expose_event", palette_expose, colorsel);
   gtk_signal_connect (GTK_OBJECT (retval), "button_press_event", palette_press, colorsel);
   
index 0abbdda674573610126381bb8e2e9386073eed32..e566b049702338a553f832d3c5d7d02d7d29d850 100644 (file)
@@ -810,9 +810,6 @@ gtk_drag_highlight_expose (GtkWidget      *widget,
 void 
 gtk_drag_highlight (GtkWidget  *widget)
 {
-  gtk_signal_connect_after (GTK_OBJECT (widget), "draw",
-                           GTK_SIGNAL_FUNC (gtk_drag_highlight_paint),
-                           NULL);
   gtk_signal_connect (GTK_OBJECT (widget), "expose_event",
                      GTK_SIGNAL_FUNC (gtk_drag_highlight_expose),
                      NULL);
index 3e40c0f8cffced38335002d8a7aea0178bae17fa..9ca79f538341659a39b79bdd772f8ae08a1190af 100644 (file)
@@ -482,36 +482,53 @@ gtk_list_item_expose (GtkWidget      *widget,
                      GdkEventExpose *event)
 {
   GtkBin *bin;
-  GdkEventExpose child_event;
 
   g_return_val_if_fail (widget != NULL, FALSE);
-  g_return_val_if_fail (GTK_IS_LIST_ITEM (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
 
   if (GTK_WIDGET_DRAWABLE (widget))
     {
       bin = GTK_BIN (widget);
 
-      if (!GTK_WIDGET_IS_SENSITIVE (widget))
-       gdk_window_set_background (widget->window, &widget->style->bg[GTK_STATE_INSENSITIVE]);
-      else if (widget->state == GTK_STATE_NORMAL)
-       gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]);
+      if (widget->state == GTK_STATE_NORMAL)
+        {
+          gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+          gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+                                 event->area.width, event->area.height);
+        }
       else
-       gdk_window_set_background (widget->window, &widget->style->bg[widget->state]);
-
-      gdk_window_clear_area (widget->window, event->area.x, event->area.y,
-                            event->area.width, event->area.height);
+        {
+          gtk_paint_flat_box (widget->style, widget->window, 
+                              widget->state, GTK_SHADOW_ETCHED_OUT,
+                              &event->area, widget, "listitem",
+                              0, 0, -1, -1);           
+        }
 
       if (bin->child)
        {
+          GdkEventExpose child_event;
+          
          child_event = *event;
 
          if (GTK_WIDGET_NO_WINDOW (bin->child) &&
              gtk_widget_intersect (bin->child, &event->area, &child_event.area))
            gtk_widget_event (bin->child, (GdkEvent*) &child_event);
        }
-
-      gtk_widget_draw_focus (widget);
+      
+      if (GTK_WIDGET_HAS_FOCUS (widget))
+        {
+          if (GTK_IS_LIST (widget->parent) && GTK_LIST (widget->parent)->add_mode)
+            gtk_paint_focus (widget->style, widget->window,
+                             NULL, widget, "add-mode",
+                             0, 0,
+                             widget->allocation.width - 1,
+                             widget->allocation.height - 1);
+          else
+            gtk_paint_focus (widget->style, widget->window,
+                             NULL, widget, NULL,
+                             0, 0,
+                             widget->allocation.width - 1,
+                             widget->allocation.height - 1);
+        }
     }
 
   return FALSE;
index b09b8288d3001f39e0083b3de3c90c15bd917b39..5de565ada514b491f433950b1762f552b1943704 100644 (file)
@@ -173,10 +173,6 @@ gtk_tooltips_force_window (GtkTooltips *tooltips)
                                 "expose_event",
                                 GTK_SIGNAL_FUNC (gtk_tooltips_paint_window), 
                                 GTK_OBJECT (tooltips));
-      gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window), 
-                                "draw",
-                                GTK_SIGNAL_FUNC (gtk_tooltips_paint_window), 
-                                GTK_OBJECT (tooltips));
 
       tooltips->tip_label = gtk_label_new (NULL);
       gtk_label_set_line_wrap (GTK_LABEL (tooltips->tip_label), TRUE);